import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/tabbar/Home.vue'
import News from '../components/news/News.vue'
import Detail from '../components/news/Detail.vue'
import list from '../components/tabbar/list.vue'
import shopcar from '../components/tabbar/shopcar.vue'
import Goodsdetail from '../components/Goodsdetail.vue'
import Search from '../components/search/Search.vue'
import Add from '../components/search/Add.vue'
import ImageShare from '../components/tabbar/ImageShare.vue'
import ImageDetail from '../components/tabbar/ImageDetail.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/home/newslist', component: News },
  { path: '/news/detail/:id', component: Detail },
  { path: '/goods/list', component: list },
  { path: '/shopcar', component: shopcar },
  { path: '/search', component: Search },
  { path: '/add', component: Add },
  {path:'/goods/detail/:id',component:Goodsdetail},
  { path: '/home/getimages', component: ImageShare },
  { path: '/home/getimages/detail/:id', component: ImageDetail }
]

const router = new VueRouter({
  routes
})

export default router
